﻿@using Nop.Core.Domain.Media
@{
    Layout = "~/Views/Shared/_Root.cshtml";
}
@{
    //current category ID
    int currentCategoryId = 0;
    if (Url.RequestContext.RouteData.Values["controller"].ToString().Equals("catalog", StringComparison.InvariantCultureIgnoreCase) &&
        Url.RequestContext.RouteData.Values["action"].ToString().Equals("category", StringComparison.InvariantCultureIgnoreCase))
    {
        currentCategoryId = Convert.ToInt32(Url.RequestContext.RouteData.Values["categoryId"].ToString());
    }


    //current manufacturer ID
    int currentManufacturerId = 0;
    if (Url.RequestContext.RouteData.Values["controller"].ToString().Equals("catalog", StringComparison.InvariantCultureIgnoreCase) &&
        Url.RequestContext.RouteData.Values["action"].ToString().Equals("manufacturer", StringComparison.InvariantCultureIgnoreCase))
    {
        currentManufacturerId = Convert.ToInt32(Url.RequestContext.RouteData.Values["manufacturerId"].ToString());
    }
    //current store ID
    int currentStoreId = Nop.Core.Domain.Stores.Store.AllStoreReservedId;
    //if (Url.RequestContext.RouteData.Values["controller"].ToString().Equals("catalog", StringComparison.InvariantCultureIgnoreCase) &&
    //    Url.RequestContext.RouteData.Values["action"].ToString().Equals("store", StringComparison.InvariantCultureIgnoreCase))
    if (Url.RequestContext.RouteData.Values.ContainsKey("storeId"))
    {
        currentStoreId = Convert.ToInt32(Url.RequestContext.RouteData.Values["storeId"].ToString());
    }

    //current product ID
    int currentProductId = 0;
    if (Url.RequestContext.RouteData.Values["controller"].ToString().Equals("catalog", StringComparison.InvariantCultureIgnoreCase) &&
        Url.RequestContext.RouteData.Values["action"].ToString().Equals("product", StringComparison.InvariantCultureIgnoreCase))
    {
        currentProductId = Convert.ToInt32(Url.RequestContext.RouteData.Values["productId"].ToString());
    }
}
<header>
    <nav class="navbar navbar-default">
        <div class="row">
            <div class="header-logo col-md-2 col-md-offset-1">
                <a href="@Url.RouteUrl("HomePage")" class="logo-image"><img class="img-responsive" src="/Content/images/spotshub-textlogo.png"></a>
            </div>
            <div class="header-menu col-md-3">
                @Html.Action("HeaderLinks", "Common", new { area = "Commerce" })

            </div>
            <div class="header-search navbar-right">
                @Html.Action("SearchBox", "Catalog", new { area = "Commerce", Cid = Request.QueryString["Cid"] })
            </div>
        </div>
    </nav>
    <div class="clear"></div>
</header>
<nav class="navbar navbar-default category-menu">
    <div class="header-category-menu">
        @Html.Action("TopMenu", "Catalog", new { area = "Commerce", storeId = Request.QueryString["CurrentStoreId"] })
    </div>
</nav>
<article>
    <section class="shopping-cart-container">
        <div class="row">
            @Html.Action("JavaScriptDisabledWarning", "Common")
            @*<div id="main" class="category-@currentCategoryId @if (ViewBag.Fixed as bool? == true) { <text>fixed</text> }">*@
                    @RenderBody()
            @*</div>*@
            @Html.Widget("content_after")
            @Html.Action("EuCookieLaw", "Common")
        </div>
    </section>
</article>    
<footer>
    @Html.Action("Footer", "Common")
</footer> 